package com.lcq.study.javabase;

import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName MapTest
 * @Description
 * @Author lichuanqi
 * @Date 2021/9/2 11:27
 * @Version 1.0
 **/
public class MapTest {
    public static void main(String[] args) {
        Map<String, String> map = new HashMap<>();
        map.put("1", "张三");
        map.put("2", "李四");
        map.put("3", "王五");
        map.put("4", "赵六");
        for (Map.Entry entry : map.entrySet()) {
            String format = String.format("(%s,%s)", entry.getKey(), entry.getValue());
            System.out.println(format);
        }
    }
}
